package com.ali.aliwebsite.mapper;

import com.ali.aliwebsite.entity.Admin;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface AdminMapper {
    @Select("select password from admin where username=#{username}")
    String login(String username);

    @Select("select * from admin where username=#{username}")
    Admin selectByUsername(String username);

    @Select("select * from admin where username=#{username}")
    Admin getUsername(String username);

    @Select("select * from admin")
    List<Admin> selectAll();
}
